<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="order.*" %>
<% String contextPath = request.getContextPath(); %>
<%
	String msg = (String)request.getAttribute("msg");
	if (msg == null) msg = "";
	Customer customer = (Customer)request.getAttribute("customer");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="<%= contextPath %>/css/style.css" type="text/css" />
		<title>注文管理システム</title>
	</head>
	<body>
		<div>
			<table>
				<tr>
					<td width="80px">顧客番号</td>
					<td><%= customer.getNumber() %></td>
				</tr>
				<tr>
					<td>顧客名</td>
					<td><%= customer.getName() %></td>
				</tr>
				<tr>
					<td>住所</td>
					<td><%= customer.getAddress() %></td>
				</tr>
				<tr>
					<td>電話番号</td>
					<td><%= customer.getTel() %></td>
				</tr>
			</table>
		</div>
		<br />
		<form action="<%= contextPath %>/OrderEntryServlet">
			<input type="hidden" name="customer" value="<%= customer.getNumber() %>" />
			<table>
				<caption>注文内容</caption>
				<tr>
					<td width="20"></td>
					<td>商品番号</td>
					<td>単価</td>
					<td>数量</td>
				</tr>
				<% for (int i=0 ; i<6 ; i++) { %>
				<tr>
					<td><%= i %></td>
					<td><input type="text" name="number<%= i %>" size="4" /></td>
					<td><input type="text" name="price<%= i %>" size="4" /></td>
					<td><input type="text" name="quantity<%= i %>" size="4" /></td>
				</tr>
				<% } %>
			</table>
			<br />
			<table>
				<tr>
					<td>
						<input type="submit" value="送信" />
					</td>
					<td>
						<a class="button" href="<%= contextPath %>/order/index.jsp">キャンセル</a>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>